package com.thti.mecool.client.util;

import android.content.Context;
import android.content.SharedPreferences;

public class PreferencesUtils {
	private static final String PREFS_NAME = "incard";
	private static SharedPreferences settings;
	
	public PreferencesUtils(Context context) {
		settings = context.getSharedPreferences(PREFS_NAME,Context.MODE_WORLD_READABLE);
	}

	/**
	 * 是否提交
	 * 
	 * @return
	 */
	public boolean isCommitting() {
		return settings.getBoolean("iscommit", false);
	}

	/**
	 * 是否提交
	 */
	public void setCommitting(boolean commit) {
		SharedPreferences.Editor editor = settings.edit();
		editor.putBoolean("iscommit", commit);
		editor.commit();
	}
}
